<%@ page import="java.util.Date" %>
<%@ page import="java.util.List,java.util.ArrayList" %>
<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2021/4/19
  Time: 10:23 上午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ page errorPage="../error/500.jsp" %>
<html>
<head>
    <title>page指令</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

</head>
<body>
<%--    注意点
        作用:1 - 声明文档类型,2 - 导包操作,3 - 用来在jsp文件出现错误的时候,跳转到一个指定的错误页面.
        1. page指令必须在jsp文件的首行.
        2. page指令允许出现多次
--%>
    <%
        Date date = new Date();
        //jsp中如果出现集合代码,建议使用jdk5.x的写法
        List<String> list = new ArrayList<String>();

        try{
            String s = null;
            out.print(s.length());
        }catch (Exception e){
            throw new NullPointerException(e.getMessage()+"-page.jsp");
        }

    %>

</body>
</html>
